<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no"/>
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <meta name="renderer" content="webkit">
    <meta name="format-detection" content="telephone=no">
    <meta name="csrf-param" content="_homeCSRF">
    <meta name="csrf-token" content="NUdnM3pyaE0Eal9nJSodOQApJnlOHwoHUixRUglFLD5xdTR5QzsAfQ==">
    <title>企业要闻</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link href="../src/img/favicon.ico" rel="shortcut icon">
    <link href="/images/favicon.ico" rel="bookmark">
    <link href="../src/img/favicon.ico" rel="shortcut icon">
    <link href="/images/favicon.ico" rel="bookmark">
    <link href="../src/css/jquery.bxslider.css" rel="stylesheet">
    <link href="../src/iconfonts/iconfont.css" rel="stylesheet">
    <link href="../src/css/bootstrap.css" rel="stylesheet">
    <link href="../src/css/dookayui.css" rel="stylesheet">
    <link href="../src/css/dx.css" rel="stylesheet">

    <link href="../src/css/special-reset.css" rel="stylesheet">

    <link href="../src/css/dy.css" rel="stylesheet">
    <!--[if lte IE9]>
    <script src="../src/js/html5shiv.js"></script>
    <![endif]-->
    <!--[if lte IE9]>
    <script src="../src/js/respond.min.js"></script>
    <![endif]-->
</head>


<body>
<div class="header"></div>
<div id="pbody" class="">

    <div class="course-wrap wrap">
        <div class="title mb-5 pengxin-news-title hidden-xs">
            <h2 class="font-20 english-title"></h2>
            <p class="font-20 article-title"></p>
        </div>
        <div class="row">
            <div class="col-md-12 col-sm-12 col-xs-12 project_slider dt-slide dy-logo do-logo hidden-xs pc-lists  bg-gray">
                <div class="course-list">
                    <span class="butn prev"></span>
                    <div class="ovh">
                        <ul class="lic-left" style="width:100%!important;">
                        </ul>
                    </div>
                    <span class="butn next"></span>
                </div>
            </div>

            <div class="col-md-12 col-sm-12 col-xs-12  mobile-project-list devlist visible-xs px-mobile">
            </div>
        </div>


    </div>
    <footer class="footer"></footer>
</div>
<script type="text/javascript" src="../src/js/jquery-2.1.4.js"></script>

<script src="../src/js/dookayui.min.js"></script>
<script src="../src/js/common.js"></script>
</body>


<script>
    function serilizeURL(url) {
        var rs = url.split("?")[1];
        var arr = rs.split("&");
        var json = {};
        for (var i = 0; i < arr.length; i++) {
            if (arr[i].indexOf("=") != -1) {
                json[arr[i].split("=")[0]] = arr[i].split("=")[1];
            }
            else {
                json[arr[i]] = "undefined";
            }
        }

        return json;
    }

    var url = location.href;
    if (url.split("?")[1] && url.split("?")[1].split("&")) {
        var pid = serilizeURL(url).pid;
        var secondMenuId = serilizeURL(url).secondMenuId;
    }

    function queryArticleByColumnId(id) {
//        addActiveTabs(pid);
        $.ajax({
            url: "http://192.168.100.181:8080/api/article/queryArticleByColumn?id=" + id,
            success: function (data) {
                articleLists = data.data;

                var articleListsLength = articleLists.length;
                $('.mobile-project-list.visible-xs.px-mobile').empty();
                for (var i = 0; i < articleListsLength; i++) {


                    if(articleLists[i].summary.indexOf('；')>=0){

                                  console.log('--------------------------------');
                                  console.log(articleLists[i].summary);

                    }

                    console.log( articleLists[i].summary.split('；'));

                    $('.mobile-project-list.devlist.visible-xs.px-mobile').append(`
                    <div class="card card-top">
                        <div class="card-header card-header-bg">${articleLists[i].title}</div>
                        <div class="card-content history-content-date">
                            <p>${articleLists[i].summary}</p>
                        </div>
                    </div>
`);
                    if (i % 2 == 0) {
                        $('.hidden-xs.pc-lists .ovh .lic-left').append(`
                            <li>
                                <div class="top">${articleLists[i].title}</div>
                                <div class="main">
                                    <p>${articleLists[i].summary}</p>
                                </div>
                            </li>
`)
                    } else {
                        $('.hidden-xs.pc-lists .ovh .lic-left').append(`
                            <li class="odd">
                                <div class="main">
                                    <p>${articleLists[i].title}
                                        <br>
                                       </p></div>
                                <div class="top">${articleLists[i].summary}</div>
                            </li>
`)
                    }
                }
                $('.hidden-xs.pc-lists .ovh .lic-left').append(`
                                <li></li>
                                <li class="odd"></li>
                                <li></li>
                                <li class="odd"></li>
                                <li></li>
                                <li class="odd"></li>
                                <li></li>
                                <li class="odd"></li>
                                <li></li>
                                <li class="odd"></li>
                                <li></li>
                                <li class="odd"></li>
                                <li></li>
                                <li class="odd"></li>
                                <li></li>
                                <li class="odd"></li>
                                <li></li>
                                <li class="odd"></li>

                `);

            }
        })
    }


    queryArticleByColumnId(secondMenuId);


</script>
<script>
    setTimeout(function () {
        coursescroll();

        //历程列表
        function coursescroll() {
            var H = 0;
            var w = $(".course-wrap .course-list .ovh").width();
            for (i = 0; i < $(".course-list li").length; i++) {
                if ($(".course-list li").eq(i).height() > H) {
                    H = $(".course-list li").eq(i).height();
                }
                if ($(".course-list li").eq(i).index() * (207 + 93) > w) {
                    $(".course-list li").eq(i).css('opacity', '0');
                } else {
                    $(".course-list li").eq(i).css('opacity', '1');
                }
            }
            var a = Math.ceil($(".course-list .ovh").width() / 300);

            $(".course-list .ovh").height(2 * H - 15)
            $(".course-list ul").width($(".course-list li").length * (607 + 93));
            $(".course-list li").not($(".course-list li.odd")).each(function () {
                $(this).css("margin-top", H - 15)
            })
            $(".course-list li.odd").each(function () {
                $(this).css("margin-top", H - $(this).height())
            })
            $(".course-list li").eq(a).addClass("on").next().css("opacity", 0)
            $(".course-list .next").click(function () {
                $(".course-list .prev").show();
                var $LiOn = $(".course-list li.on")
                // $(".course-list li.on").next().css("opacity", 1)
                $(".course-list li").eq($LiOn.index() - a).css("opacity", 0)
                if ($(".course-list li").length - 1 > $LiOn.index()) {
                    if ($LiOn.index() == $(".course-list li").length - 2) {
                        $(this).hide();
                    }
                    $(".course-list li.on").next().addClass("on").siblings().removeClass("on")
                    var n = $(".course-list li.on").index() - a;
                    $(".course-list ul").stop().animate({marginLeft: -n * 213}, 500);
                    $(".course-list li.on").prev().css('opacity', '1');
                    $(".course-list li.on").css('opacity', '0');
                    $(".course-list li").last().css('opacity', '1');
                }
            })
            $(".course-list .prev").click(function () {
                $(".course-list .next").show();
                var $LiOn = $(".course-list li.on");
                if ($LiOn.index() > a) {
                    if ($LiOn.index() == a + 1) {
                        $(this).hide();
                    }
                    $(".course-list li.on").prev().addClass("on").siblings().removeClass("on")
                    $(".course-list li.on").next().css("opacity", 0)
                    $(".course-list li").eq($(".course-list li.on").index() - a).css("opacity", 1)
                    var n = $(".course-list li.on").index() - a;
                    $(".course-list ul").stop().animate({marginLeft: -n * 213}, 500);
                }
            })
        }
    }, 2000)

    $(function () {
        commonApp.init();
        //轮播

    });


    $(document).ready(function () {
            $(".header").load("http://192.168.100.181:8080/huoge-edu/public-file/secondMenu-header.html", function () {
                $(".px-mobile .dy-nav .bread").on("click", function () {
                    $(".px-mobile .main-nav").slideToggle("slow");
                });
            });
        $(".footer").load("http://192.168.100.181:8080/huoge-edu/public-file/footer.html");
    });
    setTimeout(function () {
        $('.article-title').html($($('.active')[2])[0].innerText);
        $('.english-title').html($($('.active')[2]).data('english'));
        document.title = $($('.active')[2])[0].innerText;
    },100)
</script>
</html>